{extend name="public/base" /}
{block name="content"}
<!-- Page Content -->
<div class="page-content">
    <!-- Page Breadcrumb -->
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <a href="#">系统</a>
            </li>
            <li>
                <a href="#">公司管理</a>
            </li>
            <li class="active">公司编辑</li>
        </ul>
    </div>
    <!-- /Page Breadcrumb -->

    <!-- Page Body -->
    <div class="page-body">

        <div class="row">
            <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="widget">
                    <div class="widget-header bordered-bottom bordered-blue">
                        <span class="widget-caption">公司编辑</span>
                    </div>
                    <div class="widget-body">
                        <div id="horizontal-form">
                            <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
                                <input type="hidden" value="{$admins.imgs}" name="oldinfo">
                                <input type="hidden" value="{$admins.banner}" name="banner">
                                <input type="hidden" name="id" value="{$admins.id}">
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">公司名称</label>
                                    <div class="col-sm-6">
                                        <input class="form-control" id="name" placeholder="" name="name" required=""   type="text" value="{$admins.name}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="menuName" class="col-sm-2 control-label no-padding-right">预览图片</label>
                                    <div class="col-sm-6"><img id="preview" src="__STATIC__/images/{$admins.logo}" alt="原来的图片" height="80"/>
                                    </div>
                                </div>
                                <input type="hidden" name="oldplace" value="{$admins.logo}">
                                <input type="hidden" name="id" value="{$admins.id}">

                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">公司logo</label>
                                    <div class="col-sm-6">
                                        <input  id="logo"  name="logo"  type="file" style="float: left;">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">公司电话</label>
                                    <div class="col-sm-6">
                                        <input class="form-control" id="tel" placeholder="" name="tel" required="" minlength="6" maxlength="16"  value="{$admins.tel}"  type="text">
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">关于公司</label>
                                    <div class="col-sm-6">
                            <textarea id="content" name="about">{$admins.about}
                        </textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">区域</label>
                                    <div class="col-sm-6">
                                        <select name="areaid">
                                            {volist name="area" id="area"}
                                            <option value="{$area.id}" {if condition="$area.id eq $admins.areaid"}selected{/if} >{$area.aname}</option>
                                            {/volist}
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">风格</label>
                                    <div class="col-sm-6">
                                        {volist name="style" id="style"}
                                        <div class="checkbox" style="display: inline-block;margin-right: 12px;">
                                            <label>
                                                <input type="checkbox" name="styleid[]" {in name="$style.id" value="$admins.styleid" }checked{/in}  value="{$style.id}">
                                                <span class="text">{$style.sname}</span>
                                            </label>
                                        </div>
                                        {/volist}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">类型</label>
                                    <div class="col-sm-6">
                                        {volist name="type" id="type"}
                                        <div class="checkbox" style="display: inline-block;margin-right: 12px;">
                                            <label>
                                                <input type="checkbox" name="typeid[]" {in name="$type.id" value="$admins.typeid" }checked{/in} value="{$type.id}">
                                                <span class="text">{$type.tname}</span>
                                            </label>
                                        </div>
                                        {/volist}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">描述</label>
                                    <div class="col-sm-6">
                                        <textarea class="form-control" name="desc" id="" cols="60" rows="5">{$admins.desc}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">图列</label>
                                    <div class="col-sm-6 addbtn_wrap">
                                        <input  type="file" name="image[]" id="file1" style="z-index: 1;width: 60px;display: inline-block" onchange="getPhoto(this)">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">banner</label>
                                    <div class="col-sm-6">
                                        <input  type="file" name="banner[]" multiple id="file2" style="z-index: 1;display: inline-block">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-default">保存信息</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /Page Body -->
</div>
<!-- /Page Content -->

{/block}